﻿using System.Collections.Generic;
using System.Web.Mvc;
using System.Web.Routing;
using Orchard.Mvc.Routes;
using QuickShow.Controllers;

namespace QuickShow
{
    public class Routes : IRouteProvider
    {
        public IEnumerable<RouteDescriptor> GetRoutes()
        {
            return new[] {
            new RouteDescriptor {
                    Priority = 5 ,
                    Route = new Route(
                        "QuickShow",
                        new RouteValueDictionary {
                                                    {"area", "QuickShow"},
                                                    {"controller", "ShowMain"},
                                                    {"action", "Index"}
                                                },
                        new RouteValueDictionary(),
                        new RouteValueDictionary {
                                                    {"area", "QuickShow"}
                                                },
                        new MvcRouteHandler()),

                }

         }; 
        }

        public void GetRoutes(ICollection<RouteDescriptor> routes)
        {
            foreach (var routeDescriptor in GetRoutes())
                routes.Add(routeDescriptor);
        }
    }
}